const Koa = require("koa");
const app = new Koa();
const router = require("./routes/index");

// koa-static
const koaStatic = require("koa-static");
app.use(koaStatic(__dirname+'/public'));
// koa-bodyparser
const bodyParser = require("koa-bodyparser");
app.use(bodyParser());


app.use(router.routes()).use(router.allowedMethods());


app.listen(3000,()=>{
    console.log("server is running on http://localhost:3000");
})